#ifndef _PROCESSORDER_H_
#define _PROCESSORDER_H_

#include <vector>
#include <pthread.h>
#include <string.h>
#include <algorithm>
#include "glog/logging.h"
#include "Communication.h"
#include "DB_MySql.h"
using namespace std;

extern ORDER_LIST  g_OrderList;
extern DEVICE_LIST g_FreeDeviceLsit;
class ProcessOrder
{
public:
    ProcessOrder();
    ~ProcessOrder();

    MySql_DB *m_pMySql;



    pthread_mutex_t m_mutex_OrderList;
    pthread_mutex_t m_mutex_FreeDeviceLsit;

    bool start();
   // void CheckOrderFormDB();
    void SendOrders();
    void MonitorOrders();

};

//void *threadCheckOrderFormDB(void*p);
void *threadSendOrders(void*p);
void *threadMonitorOrders(void*p);
#endif // _PROCESSORDER_H_
